﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PersonLeft.ascx.cs"
    Inherits="ZF.WS.UserControls.PersonLeft" %>
<div class="left">
    <div class="tac_ menu ">
        <zf:ListView runat="server" ID="lvMenu">
            <LayoutTemplate>
                <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
            </LayoutTemplate>
            <ItemTemplate>
                <dl class='<%# bool.Parse(Eval("M.Attribute('isExpand').Value").ToString())? "": "slideDown"  %>'>
                    <dt style='<%# (int)Eval("COUNT")>0?"": "display:none" %>'><span class="fl_">
                        <%# Eval("M.Attribute('title').Value")%></span> <span>
                            <img src='/<%# Eval("M.Attribute('icon').Value")%>' /></span> </dt>
                    <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# Eval("L") %>'>
                        <ItemTemplate>
                            <dd>
                            
                    
                                <a href='<%# Eval("Attribute('url').Value") %>'  target='<%# Eval("Attribute('target').Value")%>'    >
                                    <%# Eval("Attribute('title').Value") %></a>
                            </dd>
                        </ItemTemplate>
                    </asp:Repeater>
                </dl>
            </ItemTemplate>
        </zf:ListView>
    </div>
</div>
<script>
    $(document).ready(function() {
      
        $(".left .menu dd:not(dd:has(dl))").mouseover(function() {
            $(this).addClass("over");
        });
        $(".left .menu dd:not(dd:has(dl))").mouseout(function() {
            $(this).removeClass("over");
        });
        $(".shrink").click(function() {
            $(".left").toggle();
        });

        $(".left .menu dt").click(function() {
            if ($(this.parentNode).hasClass("slideDown")) {
                $(this.parentNode).find("dd").not($.makeArray($(this.parentNode).find("dd dd"))).slideDown("fast", function() {
                    var cs = $(this.parentNode).attr("class").replace("slideDown", "")
                    $(this.parentNode).attr("class", cs)
                });
            } else {
                $(this.parentNode).find("dd").not($.makeArray($(this.parentNode).find("dd dd"))).slideUp("fast", function() {
                    if (!$(this.parentNode).hasClass("slideDown")) {
                        var cs = $(this.parentNode).attr("class") + " slideDown";
                        $(this.parentNode).attr("class", cs)
                    }
                });
            }
        }
            );
         
    });
        
    </script>